// 文章相关的接口
import request from '@/utils/request'

// 获取文章分类列表
export const reqGetCateGory = () => request({
  method: 'get',
  url: '/my/cate/list'
})

// 新增文章分类
export const reqGetCateAdd = obj => request({
  method: 'post',
  url: '/my/cate/add',
  data: obj
})

// 根据 id 删除文章分类
export const reqDelCate = id => request({
  method: 'delete',
  url: '/my/cate/del',
  params: {
    id
  }
})

// 根据 id 获取文章分类数据
export const reqGetCateList = id => request({
  method: 'get',
  url: '/my/cate/info',
  params: { id }
})

// 根据 id 更新文章分类数据
export const reqUpdateCate = obj => request({
  method: 'put',
  url: '/my/cate/info',
  data: obj
})
